package vn.edu.saigontech.ncms.model.system;

import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;

@Entity
@DiscriminatorValue("amount_discount")
@SuppressWarnings("serial")
public class ReceiptAmountDiscountItem extends ReceiptAbstractDiscountItem {
	
	@Column(name = "amount")
	private Double amount;

	@Override
	public String getDescription() {
		return this.name + " (" + this.getValueDescription() + ")";
	}

	@Override
	public String getValueDescription() {
		long lPercent = Math.round(this.amount);
		return "" + lPercent + " VND";
	}
	
	public Double getAmount() {
		return amount;
	}

	public void setAmount(Double amount) {
		this.amount = amount;
	}
}